package com.javaee.wordtree.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.util.List;

/**
 * RAG检索响应实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RagResponse {
    
    @JsonProperty("count")
    private Integer count;
    
    @JsonProperty("results")
    private List<RagResult> results;
    
    /**
     * RAG检索结果实体类
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class RagResult {
        
        @JsonProperty("similarity")
        private Double similarity;
        
        @JsonProperty("question")
        private String question;
        
        @JsonProperty("answer")
        private String answer;
        
        @JsonProperty("otherAnswers")
        private List<String> otherAnswers;
    }
}
